/**
 * Copyright 2009 by Christian Scheid. This file is part of the switch eclipse plugin and is licensed under the
 * GPL version 3. Please refer to the URL http://www.gnu.org/licenses/gpl-3.0.html for details.
 */
package org.digitalsoul.switchplugin.prefs.util;

import org.digitalsoul.switchplugin.model.Criteria;


class Printer {

    private static final String EQUALS = " = ";
    private static final String INVERSE_MODE = " [inverse] ";
    
    static String print(Criteria criteria) {
        StringBuffer buffer = new StringBuffer();
        buffer.append(criteria.getType().name().toLowerCase());
        if (criteria.isInverse()) {
            buffer.append(INVERSE_MODE);
        }
        buffer.append(EQUALS);
        buffer.append(criteria.toString());
        return buffer.toString();
    }
}
